home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / mus / play / DeliDecrunch.lha / src / DeliPlayer.h < prev    next >
C/C++ Source or Header  |  2000-09-19  |  4KB  |  175 lines

  1. /* DeliDecruncher (C) 2000 Stuart Caie <kyzer@4u.net>
  2.  *
  3.  * This program is free software; you can redistribute it and/or modify
  4.  * it under the terms of the GNU General Public License as published by
  5.  * the Free Software Foundation; either version 2 of the License, or
  6.  * (at your option) any later version.
  7.  *
  8.  * This program is distributed in the hope that it will be useful,
  9.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.  * GNU General Public License for more details.
  12.  *
  13.  * You should have received a copy of the GNU General Public License
  14.  * along with this program; if not, write to the Free Software
  15.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  */
  17.  
  18. #ifndef MISC_DELIPLAYER_H
  19. #define MISC_DELIPLAYER_H 1
  20.  
  21. #ifndef EXEC_PORTS_H
  22. #include <exec/ports.h>
  23. #endif
  24.  
  25. #ifndef EXEC_TYPES_H
  26. #include <exec/types.h>
  27. #endif
  28.  
  29. #ifndef UTILITY_TAGITEM_H
  30. #include <utility/tagitem.h>
  31. #endif
  32.  
  33.  
  34. #define DELIVERSION     (17)    /* Current Version of DeliTracker */
  35. #define DELIREVISION    (4)     /* Current Revision of DeliTracker */
  36.  
  37. struct DeliTrackerPlayer {
  38.   ULONG dtp_RTS_code;
  39.   ULONG dtp_head_DELI;
  40.   ULONG dtp_head_RIUM;
  41.   struct TagItem *dtp_TagArray;
  42. };
  43.  
  44. enum {
  45.   DTP_InternalPlayer=0x80004454,
  46.   DTP_CustomPlayer,
  47.   DTP_RequestDTVersion,
  48.   DTP_RequestKickVersion,
  49.   DTP_PlayerVersion,
  50.   DTP_PlayerName,
  51.   DTP_Creator,
  52.   DTP_Check1,
  53.   DTP_Check2,
  54.   DTP_ExtLoad,
  55.   DTP_Interrupt,
  56.   DTP_Stop,
  57.   DTP_Config,
  58.   DTP_UserConfig,
  59.   DTP_SubSongRange,
  60.   DTP_InitPlayer,
  61.   DTP_EndPlayer,
  62.   DTP_InitSound,
  63.   DTP_EndSound,
  64.   DTP_StartInt,
  65.   DTP_StopInt,
  66.   DTP_Volume,
  67.   DTP_Balance,
  68.   DTP_Faster,
  69.   DTP_Slower,
  70.   DTP_NextPatt,
  71.   DTP_PrevPatt,
  72.   DTP_NextSong,
  73.   DTP_PrevSong,
  74.   DTP_SubSongTest,
  75.   DTP_NewSubSongRange,
  76.   DTP_DeliBase,
  77.   DTP_Flags,
  78.   DTP_CheckLen,
  79.   DTP_Description,
  80.   DTP_Decrunch,
  81.   DTP_Convert,
  82.   DTP_NotePlayer,
  83.   DTP_NoteStruct,
  84.   DTP_NoteInfo,
  85.   DTP_NoteSignal,
  86.   DTP_Process,
  87.   DTP_Priority,
  88.   DTP_StackSize,
  89.   DTP_MsgPort,
  90.   DTP_Appear,
  91.   DTP_Disappear,
  92.   DTP_ModuleName,
  93.   DTP_FormatName,
  94.   DTP_AuthorName,
  95.   DTP_InitNote,
  96.   DTP_NoteAllocMem,
  97.   DTP_NoteFreeMem,
  98.   DTP_PlayerInfo,
  99.   DTP_Patterns,
  100.   DTP_Duration,
  101.   DTP_SampleData,
  102.   DTP_MiscText
  103. };
  104.  
  105. #define PLYB_CUSTOM  (0)
  106. #define PLYF_CUSTOM  (1<<0)
  107. #define PLYB_SONGEND (1)
  108. #define PLYF_SONGEND (1<<1)
  109. #define PLYB_ANYMEM  (2)
  110. #define PLYF_ANYMEM  (1<<2)
  111.  
  112.  
  113. struct DeliMessage {
  114.   struct Message msg;
  115.   ULONG DTMN_Function;
  116.   ULONG DTMN_Result;
  117. };
  118.  
  119.  
  120. struct DeliTrackerGlobals {
  121.   APTR  dtg_AslBase;
  122.   APTR  dtg_DOSBase;
  123.   APTR  dtg_IntuitionBase;
  124.   APTR  dtg_GfxBase;
  125.   APTR  dtg_GadToolsBase;
  126.   APTR  dtg_ReservedLibraryBase;
  127.  
  128.   STRPTR  dtg_DirArrayPtr;
  129.   STRPTR  dtg_FileArrayPtr;
  130.   STRPTR  dtg_PathArrayPtr;
  131.  
  132.   APTR  dtg_ChkData;
  133.   ULONG  dtg_ChkSize;
  134.  
  135.   UWORD  dtg_SndNum;
  136.   UWORD  dtg_SndVol;
  137.   UWORD  dtg_SndLBal;
  138.   UWORD  dtg_SndRBal;
  139.   UWORD  dtg_LED;
  140.   UWORD  dtg_Timer;
  141.  
  142.   APTR (*dtg_GetListData)(UWORD); /* use DeliGetListData() ! */
  143.   APTR (*dtg_LoadFile)();
  144.   STRPTR (*dtg_CopyDir)();
  145.   STRPTR (*dtg_CopyFile)();
  146.   STRPTR (*dtg_CopyString)(STRPTR); /* use DeliCopyString() ! */
  147.   void (*dtg_AudioAlloc)();
  148.   void (*dtg_AudioFree)();
  149.   void (*dtg_StartInt)();
  150.   void (*dtg_StopInt)();
  151.   void (*dtg_SongEnd)();
  152.   void (*dtg_CutSuffix)();
  153.   void (*dtg_SetTimer)();
  154.   void (*dtg_WaitAudioDMA)();
  155.   void (*dtg_LockScreen)();
  156.   void (*dtg_UnlockScreen)();
  157.   void (*dtg_NotePlayer)();
  158.   APTR (*dtg_AllocListData)(ULONG, ULONG); /* use DeliAllocListData() ! */
  159.   void (*dtg_FreeListData)(APTR); /* use DeliFreeListData() ! */
  160. };
  161.  
  162. #define DELIBASE __reg("a5") struct DeliTrackerGlobals *DeliBase
  163.  
  164. extern APTR DeliGetListData(__reg("d0") UWORD num, DELIBASE);
  165. extern STRPTR DeliCopyString(__reg("a0") STRPTR string, DELIBASE);
  166. extern APTR DeliAllocListData(__reg("d0") ULONG bytesize, __reg("d1") ULONG flags, DELIBASE);
  167. extern void DeliFreeListData(__reg("a1") APTR memblock, DELIBASE);
  168.  
  169. #define GetListData(x)     (DeliGetListData((x),DeliBase))
  170. #define CopyString(x)      (DeliCopyString((x),DeliBase))
  171. #define AllocListData(x,y) (DeliAllocListData((x),(y),DeliBase))
  172. #define FreeListData(x)    (DeliFreeListData((x),DeliBase))
  173.  
  174. #endif
  175.